<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="root" value="${pageContext.request.contextPath}"/>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

    <title>My JSP 'index.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
</head>

<body>
<%-- 这种是通过访问静态资源的方式访问文件,没有通过servlet访问 --%>
<a href="${root }/uploadFolder/1a.jpg">1.jpg</a>
<a href="${root }/uploadFolder/萌宝宝.jpg">萌宝宝.jpg</a>
<a href="${root }/uploadFolder/3b.txt">3.txt</a>
<br><br>
<font size="2" color="red">第一部分都是通过浏览器直接访问静态资源,未经过servlet</font>
<hr>
<%--	这种是通过servlet来访问资源--%>
<a href="${root }/download?fileName=1a.jpg">1a.jpg</a>
<a href="${root }/download?fileName=萌宝宝.jpg">萌宝宝.jpg</a>
<a href="${root }/download?fileName=3b.txt">3b.txt</a>
<br><br>
<font size="2" color="red">第二部分都是通过访问servlet,将需要的资源通过参数传递过来</font>
</body>
</html>
